package org.budo.dubbo.http.client.java.impl;

import org.budo.dubbo.http.client.java.Serialization;

import com.alibaba.fastjson.JSON;

/**
 * FastJson 序列化
 * 
 * @author lmw-2
 */
public class FastJsonSerialization implements Serialization {
    @Override
    public String serialize(Object obj) {
        return JSON.toJSONString(obj);
    }

    @Override
    public Object deserialize(String json, Class<?> type) {
        return JSON.parseObject(json, type);
    }
}